You are here: COM API reference > Client objects > IAMBatchAssemblyInfo interface

IAMBatchAssemblyInfo interface

This interface is used to get detailed information about an assembly during assembly duplication.

Members Members
Name Description

AddDocInfo method

Adds the document with the given ID to the assembly copy operation.

Count property

The number of documents in the assembly copy operation.

Documents property

An array with the IDs of the documents that are included in the assembly.

Flags property

The Duplication flag for the document with the given ID. See Remarks.

Property property

Temporary storage for custom information related to documents in the assembly. This information will be lost after the duplication operation has completed.

RemoveAllDocInfo method

Clears the list of documents to include in the assembly copy operation.

RemoveDocInfo method

Clears the document with the given ID from the assembly copy operation.

Root method

Returns the ID of the root document in the assembly.

Remarks

A flag value from the AMDUPLICATORFLAGS enumeration is set for each document in the assembly to indicate how it will be copied.

Enum AMDUPLICATORFLAGS
Name Description

AMDUP_DONOTINCLUDE

Excludes the document from the copy operation

AMDUP_SELECTFORCOPY

Includes a copy of the document in the new assembly

AMDUP_USEORIGINAL

Does not copy the document, but includes it in the new assembly

Sample

The code below demonstrates how to use the IAMBatchAssemblyInfo interface with the BatchOperation object.

Private Sub AMUIExtension_BeforeCopyWithReferences( 
       ByVal CurrentObject As Object, _
       ByVal OldParentDocument As AMEDM.IAMDocument, _
       ByVal NewParentDocument As AMEDM.IAMDocument, _
       DestinationFolder As AMEDM.IAMFolder, _
       Abort As Boolean)
    On Error GoTo error_handler
    Dim ext As DAMUIExtension
    Dim assyinfo As IAMBatchAssemblyInfo
    Dim batch As IASBatchOperation
    Dim docs As Variant
    Dim Count As Long
    Dim i As Long
    Dim action As String
    Set ext = Me
    Set assyinfo = ext.BatchOperation
    Set batch = assyinfo
    Dim doc As AMDocument
    Set doc = CurrentObject
    If doc.ID = assyinfo.Root Then
        batch.PrintDetails "Root Document " & doc.DisplayName
        batch.PrintDetails "Initial document list:"

        docs = assyinfo.Documents
        Count = assyinfo.Count
        For i = 0 To Count - 1
            Set doc = ext.Repository.GetFSObject(docs(i))
            Select Case assyinfo.Flags(docs(i))
            Case AMDUP_USEORIGINAL:
                action = "Use original"
            Case AMDUP_DONOTINCLUDE
                action = "Do not include"
            Case AMDUP_SELECTFORCOPY
                action = "Select for copy"
            End Select
            batch.PrintDetails "Document " & doc.DisplayName & " action: " & action
        Next i
    Else
        Set doc = CurrentObject

        Select Case assyinfo.Flags(doc.ID)
        Case AMDUP_USEORIGINAL:
            action = "Use original"
        Case AMDUP_DONOTINCLUDE
            action = "Do not include"
        Case AMDUP_SELECTFORCOPY
            action = "Select for copy"
        End Select

        batch.PrintDetails "Processing " & doc.DisplayName & " action: " & action
    End If

    Exit Sub
error_handler:
    MsgBox Err.Description
End Sub

www.bluecieloecm.com